﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="loginCallback.ascx.cs" Inherits="usercontrol_other_loginCallback" %>
 <script type="text/javascript" language="javascript">
        $(document).ready(function(){
                $('#login-trigger').click(function(){
                    $(this).next('#logincontent').slideToggle();
                    $(this).toggleClass('active');                                  
                    if ($(this).hasClass('active')) $(this).find('span').html('&#x25B2;')
                    else $(this).find('span').html('&#x25BC;')
                });
                               
        });
    </script>
<script type="text/javascript" language="javascript">
        function CalltoServer(arg,context)
        {
             arg=$('#username').val()+"|"+$('#password').val();
             context='';
            <%=Callback %>
        } 
        function GetValuefromServer(value,context)
        {
            if(value=="1") {
                var user=$('#username').val();
                $('#ctl00_loginCallback1_login').hide();
                $('#signup').html("<a href='http://localhost:2011/didong/users/thoat.html'>LogOut</a>");
                $('#hellouser').html('<a href="http://localhost:2011/didong/users/thoat.html">Xin Chào: [' +user+ ']</a>');
                }
            else $("#message").text("Đăng nhập thất bại");
        }
        function Onerror(message,context)
        {
            alert(message);
        }
    </script>
 
 <div id="top-header">
				<div id="banner">
					<img src="http://localhost:2011/didong/images/design/logo.png" alt="Digital"/>
				</div>
				<div class="header-left">
				        
				        <nav id="boxlogin" runat="server">
                            <ul>
                                    <li id="login" runat="server"> 
                                            <a id="login-trigger" href="#">
                                                    Log in <span>▼</span>
                                            </a>
                                           
                                            <div id="logincontent">
                                                    
                                                            <fieldset id="inputs">
                                                            <label id="message"></label>
                                                                    <input type="text" ID="username" name="username" placeholder="Your user name" required />
                                                                    <input type="password" ID="password" name="Password" placeholder="Password" required></asp:TextBox>
                                                            </fieldset>
                                                            <fieldset id="actions">
                                                                    <input type="button" Text="Đăng nhập" id="btnlogin" onclick="CalltoServer();" value="Đăng nhập"/>
                                                                     
                                                                    <label><input type="checkbox" checked="checked"> Keep me signed in</label>
                                                            </fieldset>
                                                     
                                            </div>
                                            
                                    </li>
                                    <li id="signup">
                                            <asp:Literal ID="litersign" runat="server"></asp:Literal>
                                    </li>
                            </ul>
                         
                        </nav>
                        
                        <div class="top-nav">
                           <div id="hellouser">
                            <asp:Literal ID="ltuser" runat="server"></asp:Literal>
				        </div>
						        <div class="cart">
						            <img src="http://localhost:2011/didong/images/design/shopping_cart.png" />
						            <asp:HyperLink ID="linkcart" runat="server">Gio hang rong</asp:HyperLink>
						        </div>
                            
				        </div>
                </div>
</div>
